//
//  FGBadge.h
//  FGChatKit
//
//  Created by Henry on 2021/5/10.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface FGBadge : UIView

/// 标题（-1显示点，nil，空，0隐藏）
@property (nonatomic, strong) NSString *badgeValue;

/// 标题字体，默认：12
@property (nonatomic, strong) UIFont *titleFont;

/// 标题颜色，默认：白色
@property (nonatomic, strong) UIColor *titleColor;

/// 气泡显示文字是时的高度，默认：20
@property (nonatomic, assign) CGFloat maxHeight;

/// 气泡显示为点时的高度，默认：8
@property (nonatomic, assign) CGFloat minHeight;

/// 根据标题获取气泡大小
+ (CGSize)badgeSizeWithValue:(NSString *)value;

/// 根据标题和字体获取气泡大小
+ (CGSize)badgeSizeWithValue:(NSString *)value font:(UIFont *)font;

/// 根据标题、字体、最大最小高度获取气泡大小
+ (CGSize)badgeSizeWithValue:(NSString *)value font:(UIFont *)font maxHeight:(CGFloat)maxHeight minHeight:(CGFloat)minHeight;

@end

NS_ASSUME_NONNULL_END
